<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

      <body>

            <ui:composition template="./../sablon/2col1cont.xhtml">
                  <ui:define name="bread"></ui:define>
                  <ui:define name="sol_Men">
                        <h:form>
                              <p:menu model="#{leftMenu.model}"/>
                        </h:form>
                  </ui:define>
                  <ui:define name="content">
                        <h:form id="form">
                              <p:growl id="gr"/>
                              <p:dataTable var="pr" value="#{hrpersonelDTO.personelList}" paginator="true" rows="20" paginatorPosition="bottom"
                                           paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                           rowsPerPageTemplate="10,20,30" selectionMode="single" selection="#{hrpersonelDTO.selectedHrpersonel}" rowSelectListener="#{hrpersonelDTO.onRowSelect}"
                                           onselectComplete="pers.show()" onRowSelectUpdate="gr display">
                                    <f:facet name="header">
                                          <h:outputText value="Kullanıcı Listesi"/>
                                          <p:commandButton value="Yeni Kullanıcı" style="float:right;height:20px;top:-5px" title="Yeni Kullanıcı" type="button"/>
                                    </f:facet>
                                    <p:column filterBy="#{pr.personelId}" sortBy="#{pr.personelId}" headerText="Personel ID" rendered="true">
                                          <h:outputText value="#{pr.personelId} "/>
                                    </p:column>
                                    <p:column filterBy="#{pr.personelNo}" sortBy="#{pr.personelNo}" headerText="Personel No">
                                          <h:outputText value="#{pr.personelNo} "/>
                                    </p:column>
                                    <p:column sortBy="#{pr.ad}" filterBy="#{pr.ad}" filterMatchMode="contains" headerText="Ad">
                                          <h:outputText value="#{pr.ad}"/>
                                    </p:column>
                                    <p:column sortBy="#{pr.soyad}" filterBy="#{pr.soyad}" filterMatchMode="contains" headerText="Soyad">
                                          <h:outputText value="#{pr.soyad}"/>
                                    </p:column>
                                    <p:column filterBy="#{pr.dtarih}" sortBy="#{pr.dtarih}" filterMatchMode="contains" headerText="Doğum Tarihi" >
                                          <h:outputText value="#{pr.dtarih}"/>
                                    </p:column>
                                    <p:column filterBy="#{pr.sgkNo}" sortBy="#{pr.sgkNo}" headerText="SGK No" >
                                          <h:outputText value="#{pr.sgkNo}"/>
                                    </p:column>
                                    <p:column filterBy="#{pr.kimlikNo}" sortBy="#{pr.kimlikNo}" headerText="T.C Kimlik No" >
                                          <h:outputText value="#{pr.kimlikNo}"/>
                                    </p:column>
                                    <p:column filterBy="#{pr.rcinsiyet.ad}" filterOptions="#{hrpersonelDTO.cinsiyetSelect}"   sortBy="#{pr.rcinsiyet.ad}" headerText="Cinsiyet">
                                          <h:outputText value="#{pr.rcinsiyet.ad}"/>
                                    </p:column>
                              </p:dataTable>
                              <p:dialog header="Personel Detay" widgetVar="pers" resizable="false"  
                                        width="200" showEffect="explode" hideEffect="explode" >  
                                    <h:panelGrid id="display" columns="2" cellpadding="4">  
                                          <h:outputText value="#{hrpersonelDTO.selectedHrpersonel.ad}"/>
                                    </h:panelGrid>  
                              </p:dialog> 
                        </h:form>
                  </ui:define>
                  <ui:define name="foot"></ui:define>

            </ui:composition>

      </body>
</html>
